package com.cancan.demo.apidebouncing.controller;

import com.cancan.demo.apidebouncing.req.AddReq;
import com.cancan.demo.apidebouncing.service.UserService;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class ApiController {

    @Autowired
    UserService userService;

    @PostMapping("/add")
    public ResponseEntity<String> add(@RequestBody AddReq addReq) {
        ResponseEntity<String> add = userService.add(addReq);
        return add;
    }

}
